﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading;

namespace RunAndPauseWithArg
{
    class Program
    {
        /// <summary>
        /// Simple test program to be used to see if WF external program acitvity owrks correctly.
        /// </summary>
        /// <param name="args"></param>
        static int Main(string[] args)
        {
            int ret = 0;
            int ticksToPause = 1000;

            if (args.Length > 0)
            {
                ticksToPause = Convert.ToInt32(args[0]);
            }
            if (args.Length > 1)
            {
                ret = Convert.ToInt32(args[1]);
            }

            ///
            /// Do the work!
            /// 

            Thread.Sleep(ticksToPause);

            ///
            /// Now, report the exit value
            /// 

            return ret;
        }
    }
}
